Metric Suggester Installation Guide

Analysis Tool of MEASURE Platform

••••••••••••••••••••••••••••••••••••••••••••••••••••••

Hardware and System Requirements

The Metric Suggester Analysis Tool for Measure platform must be deployed on an Ubuntu Server 16 or greater.

Prerequisites

Installation of redis-server

> sudo apt-get install redis-server

Installation of PostgreSQL Database

·         Installation of PostgreSQL : sudo apt-get install libpq-dev postgresql postgresql-contrib

·         Configuration of PostgreSQL :

Creation of a progress User

> sudo -i -u postgres

> psql

> CREATE USER suggesterprojectuser;

> ALTER ROLE suggesterprojectuser WITH CREATEDB;

> ALTER USER suggesterprojectuser WITH ENCRYPTED PASSWORD '#aMY@aj870';

Configuration of the Database

CREATE DATABASE suggesterproject OWNER suggesterprojectuser;

Installation of Python

> sudo apt-get install python-dev python-pip nginx

> sudo pip install virtualenv :

> sudo apt-get install python-requests

Installation of Git

> sudo apt-get install git

Installation of Metric Suggester

1.    Clone the repository of the tool

> git clone https://github.com/sasdahab/Suggester_tool.git

2.    Set Up Python Virtualenv

> cd Suggester_tool/

> virtualenv suggesterenv

3.    Activate the Virtual Environnement

> source suggesterenv/bin/activate

4.    Installer Gunicorn, Django, Celery, Redis and other dependencies

> pip install requests

> pip install -r requirements.txt

> add the public IP address in the variable ALLOWED_HOSTS in the file suggester_tool/suggesterproject/setting.py

5.    Configure the Database

> ./manage.py makemigrations

> ./manage.py migrate

> ./manage.py

> ./manage.py createcachetable

6.    Configure Gunicorne

> gunicorn --bind 127.0.0.1:8000 suggesterproject.wsgi:application

Start the Metric Suggester Tool

·         Start Redis :

> sudo service redis start

·         Start postgresql :

> sudo service postgresql start

·         Start Metric Suggester

> cd suggester_tool

> source suggesterenv/bin/activate

> ./manage.py runserver localhost:8000 (pour une utilisation local)

> ./manage.py runserver 0:8000 (pour une utilisation non local)

The Metrics Suggester tool overview

The Metrics Suggester tool is an external analysis tool which is integrated as a component to the Measure Platform through Rest APIs. It provides mechanisms for the advance data analysis functionalities apply to data produced by the continuous measurement applied by the platform.

This tool train a classifier according to a defined measurement plan which described the executed metrics, the software properties observed by this metrics and the link between both latter. Then, it analyses the measurement data through a trained classifier to suggest a new measurement plan. 

  The Metrics Suggester tool features

In this section, we will present the different steps to generate a suggestion.

Measurement Plan configuration

First of all, we should initialize the measurement plan which defines the classes (software properties evaluated), the metrics and the link between the classes and the metrics. The mandatory metrics if there is by a Boolean value and the place of each metric in the training file through the “index” field. This configuration should be done through json file as the model below cons and uploaded into the tool according to the detailed steps below

·         Click on Settings tab >> plan form

·         copy past the contained of the mp in json format >> create

·        

Click on Measurement Plans tab to display the MP details



Zone de Texte: Figure 3 Measurement plan detailed

Classifier training from the initial MP

·         Click on Settings tab  >> classifier form

·         insert the training file >> upload

·         Click on Classifier tab to display the classifiers list

·         Click on one classifier to display the training details



 

Suggestions

·         Click on Settings tab >> Suggestion form

·         select the last MP in the list

·         Select the first classifier in the list

·         insert the file with the measurement to be analyzed  >> ok

·        
Click on Suggestions tab to display the suggestion result